/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'
// import { getUserInfo } from '@/utils/auth'

// const permission = getUserInfo() && JSON.parse(getUserInfo()).user_type === 'SUPER_ADMIN'

const seniorManageRouter = {
  path: '/seniorManage',
  component: Layout,
  redirect: '/seniorManage/operationalRecords',
  name: 'seniorManage',
  // hidden: !permission,
  meta: {
    title: '高级管理',
    icon: 'seniorManage',
    roles: 'SUPER_ADMIN'
  },
  children: [
    {
      path: 'operationalRecords',
      component: () => import('@/views/seniorManage/operationalRecords'),
      name: 'operationalRecords',
      meta: {
        title: '操作记录',
        icon: 'operationalRecords',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'accountManage',
      component: () => import('@/views/seniorManage/accountManage'),
      name: 'accountManage',
      meta: {
        title: '账号管理',
        icon: 'accountManage',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'bankCardManagement',
      component: () => import('@/views/seniorManage/bankCardManagement'),
      name: 'bankCardManagement',
      meta: {
        title: '银行卡管理',
        icon: 'bankCardManagement',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'transferManage',
      component: () => import('@/views/seniorManage/transferManage'),
      name: 'transferManage',
      meta: {
        title: '转账管理',
        icon: 'bankCardManagement',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'buyerRegistrationSwitch',
      component: () => import('@/views/seniorManage/buyerRegistrationSwitch'),
      name: 'buyerRegistrationSwitch',
      meta: {
        title: '系统设置',
        icon: 'buyerRegistrationSwitch',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'membershipPackage',
      component: () => import('@/views/seniorManage/membershipPackage'),
      name: 'membershipPackage',
      meta: {
        title: '会员套餐管理',
        icon: 'membershipPackage',
        roles: 'SUPER_ADMIN'
      }
    },
    {
      path: 'userFeedback',
      component: () => import('@/views/seniorManage/userFeedback'),
      name: 'userFeedback',
      meta: {
        title: '用户反馈',
        icon: 'userFeedback',
        roles: 'SUPER_ADMIN'
      }
    }
  ]
}

export default seniorManageRouter
